import AccountCenter from "./Data/Account";
import MySqlCenter from "./Mysql/MySqlCenter";
import HttpServer from "./NetIO/HttpServer";



export default class ServerMain{
    public static pServer: ServerMain = null;
    public static getInstance(): ServerMain {
        if (ServerMain.pServer == null) {
            ServerMain.pServer = new ServerMain();
        }
        return ServerMain.pServer;
    }

    public m_pAccount:AccountCenter = null;
    public constructor(){
        console.log("Server Init Begin");
        var https = new HttpServer();
        https.StartHttpList(8080);
        MySqlCenter.getInstance().InitConnect(2);
        this.m_pAccount = new AccountCenter();
        // console.log(GlobDef.MD5Packet("dffdgfdgdfhgfweew"));
        console.log("Server Init Ok");

        
    }

}